﻿using PwjCy.Lite.Core;
using PwjCy.Lite.EntityLite;
using PwjCy.Lite.EntityLite.Imp;
using PwjCy.Lite.Persistence;
using PwjCy.Lite.Persistence.Imp;
using PwjCy.Lite.UnitTest.EntityLiteTest;
using PwjCy.Lite.UnitTest.SecurityTest;
using PwjCy.Lite.UnitTest.XmlSerializeTest;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PwjCy.Lite.UnitTest
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHub.Instance.Init(true);
            IPersister Persister = (IPersister)ServiceHub.Instance.GetService(typeof(IPersister));
            SqlBuilderTest.SaveSqlTest();
            //Persister.Save(TestPwjCyObject.CreatePwjCyObjectTypeTest());
            PwjCyObjectTypeTest test = (PwjCyObjectTypeTest)Persister.LoadPwjCyObject("", typeof(PwjCyObjectTypeTest), "1d187a5a8a9641b2b8bd57a438bd2c81");
            test.MoneyAccount = (decimal)1034.29;
            test.IsTrue = true;
            Console.WriteLine(Persister.Save(test));
            //PasswordGenerateServiceTest.EncryptPassword("Kdo7X-wH,hvS2oyWTR");
            //PasswordGenerateServiceTest.EncryptPassword("123456");
            //PasswordGenerateServiceTest.DecryptPassword("SokQJK0bD3yWrSSMVyrjVdSiLt4V0QDaigsb/CSiNbk=");
            Console.WriteLine("OK");
            Console.Read();
        }
    }
}
